package ar.com.freesales.entity;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.DiscriminatorColumn;
import javax.persistence.DiscriminatorType;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Inheritance;
import javax.persistence.InheritanceType;
import javax.persistence.Table;

import ar.com.freesales.enums.RoomTypeEnum;

@Entity
@Table(name = "OTA")
@Inheritance(strategy=InheritanceType.SINGLE_TABLE)
@DiscriminatorColumn(
    name="NAME",
    discriminatorType=DiscriminatorType.STRING
)
public abstract class Ota {
	
	private Long id;
	private String urlMain;
	private String urlLog;
	private String name;
	
	@Id
	@GeneratedValue(strategy = GenerationType.AUTO)
	@Column(name = "ID")
	public Long getId() {
		return id;
	}
	
	@Column(name = "name")
	public String getName() {
		return name;
	}
	
	@Column(name = "URL_MAIN")
	public String getUrlMain() {
		return urlMain;
	}
	
	@Column(name = "URL_LOG")
	public String getUrlLog() {
		return urlLog;
	}
	
	
	
	
	public void setUrlMain(String urlMain) {
		this.urlMain = urlMain;
	}
	
	public void setUrlLog(String urlLog) {
		this.urlLog = urlLog;
	}
	
	public void setId(Long id) {
		this.id = id;
	}

	public void setName(String name) {
		this.name = name;
	}
	
	
//	BUSINESS METHODS
	public abstract void login(String user, String pass);
	public abstract void changeMassiveRate(Date from, Date to, Float rateValue, RoomTypeEnum roomTypeEnum);
	public abstract void changeMassiveStock(Date from, Date to, Integer stock, RoomTypeEnum roomTypeEnum);
	
	
}
